import type { FindOneOptions as FindOneOptionsOrm } from 'typeorm';
import { FindOptionsWhere } from './FindOptionsWhere';
type _FindOneOptions<Entity> = Pick<
  FindOneOptionsOrm<Entity>,
  'select' | 'relations' | 'withDeleted' | 'cache' | 'order' | 'loadEagerRelations'
>;

/**
 * Defines a special criteria to find specific entity.
 */
export interface FindOneOptions<Entity = any> extends _FindOneOptions<Entity> {
  where?: FindOptionsWhere<Entity>[] | FindOptionsWhere<Entity>;
}
